<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>niaho</title>
    <link rel="icon" type="text/css" href="icon.ico"/>
    <!--<link rel="stylesheet" type="text/css" href="/shop/thinkphpshop/Public/Home/css/index.css" />-->
    <!--<script src="/shop/thinkphpshop/Public/Home/js/jquery-1.10.1.min.js" type="text/javascript" charset="utf-8"></script>-->

    <!--<script src="/shop/thinkphpshop/Public/Home/js/list.js" type="text/javascript" charset="utf-8"></script>-->
    <!--<script src="/shop/thinkphpshop/Public/Home/js/index.js" type="text/javascript" charset="utf-8"></script>-->
    <?php foreach($headConf['css'] as $k=>$v){ ?>
    <link rel="stylesheet" type="text/css" href="/shop/thinkphpshop/Public/Home/css/<?php echo ($v); ?>.css" />
    <?php } ?>
    <script>
        var ajaxUpdateCart = "<?php echo U('ajaxUpdateCart');?>";
    </script>
    <script src="/shop/thinkphpshop/Public/Home/js/jquery-1.10.1.min.js" type="text/javascript" charset="utf-8"></script>
    <?php if(is_array($headConf['js'])): $i = 0; $__LIST__ = $headConf['js'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><script src="/shop/thinkphpshop/Public/Home/js/<?php echo ($v); ?>.js" type="text/javascript" charset="utf-8"></script><?php endforeach; endif; else: echo "" ;endif; ?>
    <script src="/shop/thinkphpshop/Public/Home/layer/layer.js"></script>
    <link rel="stylesheet" href="/shop/thinkphpshop/Public/Home/layer/mobile/need/layer.css">

</head>

<body>
<!--头部开始-->
<div id="top">
    <!--头部灰条就开始-->
    <div class="topbox">
        <div class="main">
            <div class="topleft fl">
                <a href="javascript:;">欢迎来到冰雨商城</a>
                <a href="#">设为首页</a>
                <a href="#">收藏本站</a>
                <a href="#">帮助中心</a>
                <a href="#" class='last'><i></i>手机商城</a>
            </div>
            <div class="topright fr">
                <div class="login fl">
                    <a href="<?php echo u('home/login/index');?>">登录</a>
                    <a href="<?php echo u('home/login/register');?>">注册</a>
                </div>
                <span class="fl">|</span>
                <div class="fcode fl">

                    <a href="">我的订单</a>
                </div>
            </div>
        </div>
    </div>
    <!--头部灰条结束-->

    <!--logo区域开始-->
    <div class="logoRegion main">
        <div class="logo">
            <a href=""><img style="width: 230px;height: 100px;" src="/shop/thinkphpshop/Public/Home/images/xiao.png"/></a>
        </div>
        <div class="seachRegion fr">
            <div class="seach fl">
                <form action="" method="post">
                    <input type="text" class="seachtxt fl" value="O2+车载空气净化" />
                    <input type="submit" class="btn" value="" />
                </form>
                <p class="searchkey">
                    <a href="">电竞配件低至5折</a>
                    <a href="">电竞配件低至5折</a>
                    <a href="">电竞配件低至5折</a>
                </p>

            </div>
            <div class="topshopcart fr">
                <a href="" class="header-cart"><i></i>我的购物车<span class="cart-size">(<?php echo ($cartData['total_rows']); ?>)</span></a>
                <div class="cart-tips">
                    请
                    <a href="">登录</a>后查看您的购物车。
                </div>
            </div>
        </div>

    </div>
    <!--logo区域结束-->
    <div class="clear"></div>
    <!--导航开始-->
    <div class="navbox">
        <div class="main">
            <h5 class="fl"><a href=""><i></i>全部智能酷品</a></h5>
            <ul class="menu fl">
                <li class="menulist">
                    <a href="">手机</a>
                    <div class="menuHiden">

                        <ul class="product">

                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>

                        </ul>

                    </div>
                </li>
                <li class="menulist">
                    <a href="">行车记录仪</a>
                    <div class="menuHiden">
                        <ul class="product">

                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>

                        </ul>
                    </div>
                </li>
                <li class="menulist">
                    <a href="">儿童手表</a>
                    <div class="menuHiden">
                        <ul class="product">

                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>

                        </ul>
                    </div>
                </li>
                <li class="menulist">
                    <a href="">摄像机</a>
                    <div class="menuHiden">
                        <ul class="product">

                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>

                        </ul>
                    </div>
                </li>
                <li class="menulist">
                    <a href="">路由器</a>
                    <div class="menuHiden">
                        <ul class="product">

                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>
                            <li>
                                <a href=""><img src="images/right.png" alt="" /></li>
                            <li><img src="images/right.png" alt="" /></a>
                            </li>

                        </ul>
                    </div>
                </li>
                <li class="menulist">
                    <a href="">儿童机器人</a>
                </li>
                <li class="menulist">
                    <a href="">智品牌</a>
                </li>
                <li class="menulist">
                    <a href="">一元夺宝</a>
                </li>
                <li class="menulist">
                    <a href="">试用</a>
                </li>
                <li class="menulist">
                    <a href="">社区</a>
                </li>
            </ul>

        </div>

        
	</div>
	<!--导航结束-->
	<div class="clear"></div>

	</div>
	<!--头部结束-->
	<!--中间开始-->
	<div id="content">
		<form action="<?php echo u('home/Accounts/index');?>" method="post">
			<div class="car main">
				<?php if(isset($_SESSION['cart'])){ ?>
				<div class="carshop">
					<div class="cartitle">
						<div class="carcheck">
							<div class="checkbox ">
								<span class="check checkon" id="allcheck" style="border:none;margin-top: 0"></span>
							</div>
							全选</div>
						<div class="carname">商品名称</div>
						<div class="carmoney">单价</div>
						<div class="carnum">数量</div>
						<div class="carcount">小计</div>
						<div class="carhandle">操作</div>
					</div>
					<?php foreach($cartData['goods'] as $k=>$v){ ?>
					<div class="shopcontent">
						<div class="shopcheck">
							<div class="checkbox">
								<input type="checkbox" checked="checked" name='checkbox' class="checkhide"/>
								<span class="check checkon" style="margin-top: 0"></span>
							</div>
						</div>
						<div class="shopname">
							<div class="carimg">
								<a href=""><img src="/shop/thinkphpshop/Public/Home/images/car.jpg"/></a>
							</div>
							<p>
								<a href="#"><?php echo ($v['name']); ?></a>
								<span></span>
							</p>
						</div>
						<div class="shopmoney"><?php echo ($v['price']); ?>元</div>
						<div class="shopnum">

							<a href="javascript:;" class="num_l">-</a>
							<input type="text" value="<?php echo ($v['num']); ?>" />
							<a href="javascript:;" class="num_r" sid="<?php echo ($k); ?>">+</a>
						</div>
						<div class="shopcount"><?php echo ($v['total']); ?>元</div>
						<div class="shophandle"><span sid="<?php echo ($k); ?>">x</span></div>
					</div>
					<?php } ?>
				</div>
				<div class="jiesuan">
					<div class="jixu"><a href="">继续购物</a></div>
					<div class="gongji">共计<span><?php echo ($cartData['total_rows']); ?></span>件商品</div>
					<div class="heji">合计<span><?php echo ($cartData['total']); ?></span></div>
					<div class="gou"><input type="submit" value="去结算"/></div>

				</div>
				<?php }else{ ?>
				<div>
					购物车空空，<a href="">继续购物</a>
				</div>
				<?php } ?>
			</div>
			<script>
				$(function(){

				});
			</script>
		</form>
	</div>
	</div>
	<script>
		$('.shopcheck .checkbox span').click(function(){
			//alert();
			var hj = parseInt($('.heji span').text());
			var gj = parseInt($('.gongji span').text());
			//alert(hj);
			var total =parseInt($(this).parents().siblings('.shopcontent .shopcount').text());
			if($(this).hasClass('checkon')){
				//alert(total);
				var newhj= hj-total;
				var newgj=gj-parseInt($(this).parents().siblings('.shopnum').children('input').val());
				//alert(newhj);
				$('.heji span').text(newhj);
				$('.gongji span').text(newgj);
			}else{
				var newgj=gj +parseInt($(this).parents().siblings('.shopnum').children('input').val());
				var newhj= hj+total;
				$('.heji span').text(newhj);
				$('.gongji span').text(newgj);
			}
		});

		//点击全选与取消
		$('.carcheck .checkbox span').click(function(){
			//alert(hj);
			//alert(1);
			if($(this).hasClass('checkon')){
				$('.heji span').text(0);
				$('.gongji span').text(0);
			}else{
				var hj="<?php echo ($_SESSION['cart']['total']); ?>";
				//alert(hj);
				var gj="<?php echo ($_SESSION['cart']['total_rows']); ?>";

				$('.heji span').text(hj);
				$('.gongji span').text(gj);
			}


		});





	</script>



        <!--中间结束-->
        <!--尾部开始-->
        <div class="mod-footer">
            <div class="foot-bannerw">
                <div class="foot-banner clearfix">
                    <div class="banner-item">
                        <a href="#" target="_blank" data-monitor="home_foot_days7"><i class="icon1">7</i>7天无理由退货</a>
                    </div>
                    <div class="banner-item">
                        <a href="#" target="_blank" data-monitor="home_foot_days15"><i class="icon2">15</i>15天免费换货</a>
                    </div>
                    <div class="banner-item"><i class="icon3">包</i>满99元包邮</div>
                    <div class="banner-item">
                        <a href="#" target="_blank" data-monitor="home_foot_moblie"><i class="icon4">服</i>手机特色服务</a>
                    </div>
                </div>
            </div>
            <div class="foot-containerw">
                <div class="foot-container clearfix">
                    <dl class="foot-con"> <dt data-monitor="home_foot_freshman">帮助中心 </dt>
                        <dd data-monitor="home_help_freshman">
                            <a target="_blank" href="#" rel="nofollow">用户注册</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">用户登录与密码找回</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">购买指南</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">支付方式</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">配送与说明</a>
                        </dd>
                    </dl>
                    <dl class="foot-con"> <dt data-monitor="home_foot_help">售后服务 </dt>
                        <dd data-monitor="home_help_help">
                            <a target="_blank" href="#">7 日无理由退货</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">质量问题 15 日内换货</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">保修条款</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">服务流程</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">安迷之家</a>
                        </dd>
                    </dl>
                    <dl class="foot-con"> <dt data-monitor="home_foot_guide">特色服务 </dt>
                        <dd data-monitor="home_help_guide">
                            <a target="_blank" href="#" rel="nofollow">F码通道</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">免费试用</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">360 生态</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">一元夺宝</a>
                        </dd>
                    </dl>
                    <dl class="foot-con"> <dt data-monitor="home_foot_tuiguang">推广合作 </dt>
                        <dd data-monitor="home_help_try">
                            <a target="_blank" href="#" rel="nofollow">商品入驻</a>
                        </dd>
                        <dd>
                            <a target="_blank" href="#" rel="nofollow">大客户采购</a>
                        </dd>
                    </dl>
                    <dl class="foot-con"> <dt data-monitor="home_foot_try">关注360商城 </dt>
                        <dd data-monitor="home_help_try">
                            <a target="_blank" href="#" rel="nofollow">360商城大事记</a>
                        </dd>
                    </dl>

                </div>
            </div>
            <div class="footer-copyright">冰雨商城 ©2016-2018 BYCMS工作室版权所有 京ICP备000001号-43</div>
        </div>
        <!--尾部结束-->

        <!--右边底部返回顶部-->
        <div class="slidebar" id="slidebar">
            <ul>
                <li class="topback">
                    <a href="javascript:;"></a>
                </li>
            </ul>
        </div>
        <!--右边底部返回顶部结束-->
        <div class="floor">
            <ul>
                <li class="on1">
                    <a href="javascript:;"><span>1F<br />活动</span></a>
                </li>
                <li class="on2">
                    <a href="javascript:;"><span>2F<br />活动</span></a>
                </li>
                <li class="on3">
                    <a href="javascript:;"><span>3F<br />活动</span></a>
                </li>
                <li class="on4">
                    <a href="javascript:;"><span>4F<br />活动</span></a>
                </li>
                <li class="on5">
                    <a href="javascript:;"><span>5F<br />活动</span></a>
                </li>
                <li class="on6">
                    <a href="javascript:;"><span>6F<br />活动</span></a>
                </li>
            </ul>

        </div>
</body>

</html>